<template>
  <el-container class="home">
    <el-header class="head" height="calc(100vh)">
      <menu class="menu flex_between_center">
        <div class="logo">
          <!-- <el-image
            :src="require('@/assets/image/logo.png')"
          ></el-image> -->
        </div>
        <ul class="flex">
          <li>Home</li>
          <li>Study</li>
          <li>Works</li>
          <li>opus</li>
          <li>contact</li>
        </ul>
      </menu>
      <div class="homeDescribe">
        <div class="welcomeText">Welcome to my home</div>
        <div class="describeText">
          这个网站主要是用来记录一下学习历程以及展示作品
        </div>
        <a href="#study ">
          <div class="describeText flex_center">
            <div>下滑发现更多精彩</div>
            <div>
              <i
                class="el-icon-bottom"
                style="animation: float 1.5s infinite"
              ></i>
            </div>
          </div>
        </a>
      </div>
    </el-header>

    <el-main class="main">
      <!-- 学习记录 -->
      <div id="study" class="study mianContent flex_center_center">
        <div class="mianContentTitle">
          <div>
            <b>
              <i>Study&nbsp;Notes</i>
            </b>
          </div>
          <div style="font-size: 14px">
            <b>
              ——
              <i>学习笔记</i>
            </b>
          </div>
          <!-- <TitleFlip titleStr="Study Notes" flipStr="学习笔记"></TitleFlip> -->
        </div>
        <div class="containt flex_around_start">
          <NoteListPage title="笔记"></NoteListPage>
          <NoteListPage title="周记"></NoteListPage>
          <NoteListPage title="总结"></NoteListPage>
        </div>
      </div>
      <div id="works" class="works mianContent flex_center_center">
        <div class="mianContentTitle">
          <div>
            <b>
              <i>Works&nbsp;Notes</i>
            </b>
          </div>
          <div style="font-size: 14px">
            <b>
              ——
              <i>工作笔记</i>
            </b>
          </div>
          <!-- <TitleFlip titleStr="Study Notes" flipStr="学习笔记"></TitleFlip> -->
        </div>
        <div class="containt flex_around_start">
          <NoteListPage title="笔记"></NoteListPage>
        </div>
      </div>
      <div class="opus mianContent flex_center_center">
        <div class="mianContentTitle">
          <div>
            <b>
              <i>Works&nbsp;Notes</i>
            </b>
          </div>
          <div style="font-size: 14px">
            <b>
              ——
              <i>作品展示</i>
            </b>
          </div>
        </div>
        <div class="opusList flex_center_center">
          <div v-for="(item,key) in opusList" :key="key">
            <div class="item" :style="{backgroundImage:'url('+item.backgroundImage+')'}">
                {{item.name}}
            </div>
          </div>
        </div>
      </div>
      <div class="contact mianContent"></div>
    </el-main>

    <el-footer class="footer flex_center_center" height="50px">
      <RecordInfo></RecordInfo>
    </el-footer>
  </el-container>
</template>

<script>
import RecordInfo from "@/components/public/RecordInfo.vue"; //备案信息
import NoteListPage from "@/components/home/NoteListPage.vue"; //笔记列表页
import TitleFlip from "@/components/public/TitleFlip.vue"; //标题翻转

export default {
  name: "Home",
  components: {
    RecordInfo,
    NoteListPage,
    TitleFlip,
  },
  data() {
    return {
      logoSrc: "./logo.jpg",
      opusList:[
        {
          name:'1',
          backgroundImage:'../../public/image/bg1.jpg'
        },
        {
          name:'',
          backgroundImage:'../assets/image/bg2.jpg'
        },
        {
          name:'',
          backgroundImage:'../assets/image/bg3.jpg'
        }
      ]
    };
  },
};
</script>

<style lang="scss">
.home {
  .head {
    background-image: url("../assets/image/hero-background.jpg");
    // background-attachment: fixed;
    padding: 0;
    background-position-y: bottom;
    .menu {
      color: #ffffff;
      font-size: 18px;
      margin-top: 20px;
      padding: 0 50px;

      .logo {
        background-image: url("../assets/image/logo.png");
        background-size: 100%;
        background-repeat: no-repeat;
        height: 60px;
        width: 100px;
      }

      ul {
        list-style: none;
        width: 40%;
      }
      li {
        padding: 5px 20px;
        list-style: none;
        cursor: pointer;
      }
      li:hover {
        color: #87ceeb;
      }
    }
  }

  .homeDescribe {
    margin-top: 10%;
    color: #ffffff;

    .welcomeText {
      font-size: 60px;
    }

    .describeText {
      margin-top: 15px;
      flex-wrap: wrap;
      font-size: 16px;
    }
  }
}

.main {
  padding: 0;
  background-image: url("../assets/image/page-content-background.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  .mianContent {
    height: calc(100vh);
    padding: 0 10%;
    .mianContentTitle {
      width: 100%;
      text-align: left;
      b {
        // background-image: -webkit-linear-gradient(0deg, red,orange,yellow,cyan, blue,purple);
        background-image: linear-gradient(to right, #fa709a 0%, #fee140 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }
    }
  }

  .study,
  .works,
  .opus {
    flex-wrap: wrap;
    color: #ffffff;
    .containt {
      margin-bottom: 30px;
      width: 100%;
      // background-color: rgba($color: #fff, $alpha:0.5);
    }
  }

  .opus{
    .opusList{
      .item{
        height: 100px;
        width: 100px;
        background-image: url("../assets/image/bg1.jpg");
      }
    }
  }
  .foot {
    color: #ffffff;
    height: 300px;
  }
}

.footer {
  padding: 0;
  background-image: url("../assets/image/onepage-testimonial-bg.jpg");
  color: #dcdcdc;
  background-size: cover;
  font-size: 12px;
}

@keyframes float {
  0% {
    margin-top: 0px;
  }
  50% {
    margin-top: 5px;
  }
  100% {
    margin-top: 0px;
  }
}
</style>